﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.OleDb;
using BLL.Entities;

namespace HTAProDataImporter.Transport
{
    public class ContactMethodTransport : BaseEntityTransport
    {
        public override string CommandText
        {
            get { return "select * from tblContactMethod"; }
        }

        public override void InstanceFromReader(OleDbDataReader DR)
        {
            DynamicEnumTypeValue v = DynamicEnumTypeValue.CreateNewInstance<DynamicEnumTypeValue>();
            v.EnumTypeID = DataStore.ContactMethodType.EntityID;
            v.Value = DR["Description"].ToString();

            DataStore.ContactMethodTypeValues.Add(DR["pkContactMethodID"].ToString(), v);
            DataStore.ContactMethodType.Values.Add(v.Value, v);

        }
    }
}

